package org.smart4j.aopdemo.simple;

public class GreetingProxy implements Greeting {

    private Greeting greeting;

    public GreetingProxy(){
        greeting = new GreetingImpl();
    }

    public void sayHello(String name) {
        before();
        greeting.sayHello(name);
        after();
    }

    public void sayThrow() {

    }

    public void sayHelloTag() {
        System.out.println(" sayHello Tag");
    }


    public void before(){
        System.out.println(" before Hello ");
    }

    public void after(){
        System.out.println(" after Hello");
    }

    public static void main(String[] args){
        Greeting greeting = new GreetingProxy();
        greeting.sayHello("liuzx");
    }


}
